<!DOCTYPE html>
<html style="overflow-x: hidden;">
<head>
<meta charset="UTF-8">
<title>密码修改</title>
<link rel="icon" href="/image/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/upPassword.css">
</head>
<body>
<div id="all">
    <div id="herder">
        <span id="tittle">密码管理</span>
        <p id="tips"><span>修改密码关系到您的帐号安全，请慎重考虑：</span></p>
    </div>
    <div id="input">
        <ul>
            <li><input type="password" name="oldPassword" placeholder="老密码" class="text" id="oldPassword"></li>
            <li><input type="password" name="newPassword" placeholder="新密码" class="text" id="newPassword"></li>
            <li><input type="button" id="update" value="修改"></li>
        </ul>
    </div>
</div>
</body>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/2.2.2/jquery.js"></script>
<script src="js/util.js"></script>
<script>
    //使用久密码修改密码
    $('#update').click(function(){
        var oldPassword = $('#oldPassword').val();
        var newPassword = $('#newPassword').val();
        $.ajax({
            url:'pan/upPassword',
            type:'post',
            data:{oldPassword:oldPassword,newPassword:newPassword},
            success:function (e) {
                if(e.message=="修改成功"){
                    alert('修改成功')
                }
                console.log()
            },err:function (e) {
                console.log()
            }
        })
    })
</script>
</html>